import { postAxios, getAxios } from '@/lib/http';

export const peopleApi = {

  // 用户列表
  getPeopleList: (result) => {
    return postAxios('/people/list', result);
  },
  // 用户列表
  queryDepartmentById: () => {
    return postAxios('/people/queryDepartmentById').then(res=>res.result);
  },
  // 获取用户详情
  getPeopleDetail: id => {
    return postAxios('/people/batchSet', id);
  },
  // 批量设置某角色数据范围
  deletePeople: id => {
    return postAxios('/people/batchSet', id);
  },
  // 批量设置某角色数据范围
  updatePeople: data => {
    return postAxios('/people/batchSet', data);
  },
  // 获取某角色所设置的数据范围
  getPeopleByRoleId: roleId => {
    return getAxios('/people/listByRole/' + roleId);
  }
};
